a, x, b, y, c, z = map(int,input().split())
d = int(input())
flag = 0

for i in range(1, a + 1):
    for j in range(1, b + 1):
        if x * i + y * j == d:
            flag = 1

for i in range(1, a + 1):
    for j in range(1, c + 1):
        if x * i + z * j == d:
            flag = 1

for i in range(1, b + 1):
    for j in range(1, c + 1):
        if y * i + z * j == d:
            flag = 1

print('YES' if flag else 'NO')